﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<title>电气与信息工程学院国家级大学生校外实践教育基地网络教学平台后台管理系统</title>
		<include file="public/reference" />
		<script type="text/javascript">
			var tab = null;
			var accordion = null;
			var tree = null;
			var tabItems = [];
			function addTab(tabid, text, url) {
				tab.addTabItem({
					tabid: tabid,
					text: text,
					url: url,
					callback: function() {
						addFrameSkinLink(tabid);
					}
				});
			}
			function addFrameSkinLink(tabid) {
				var skin = getQueryString("skin");
				if (!skin) return;
				skin = skin.toLowerCase();
				attachLinkToFrame(tabid, skin_links[skin]);
			}
			$(function() {

				//布局
				$("#layout1").ligerLayout({
					leftWidth: 190,
					height: '100%',
					heightDiff: -34,
					space: 4,
					onHeightChanged: f_heightChanged
				});

				var height = $(".l-layout-center").height();

				//Tab
				$("#framecenter").ligerTab({
					height: height,
					showSwitchInTab: true,
					showSwitch: true,
					onAfterAddTabItem: function(tabdata) {
						tabItems.push(tabdata);
						saveTabStatus();
					},
					onAfterRemoveTabItem: function(tabid) {
						for (var i = 0; i < tabItems.length; i++) {
							var o = tabItems[i];
							if (o.tabid == tabid) {
								tabItems.splice(i, 1);
								saveTabStatus();
								break;
							}
						}
					},
					onReload: function(tabdata) {
						var tabid = tabdata.tabid;
						addFrameSkinLink(tabid);
					}
				});

				//面板
				$("#accordion1").ligerAccordion({
					height: height - 24,
					speed: null
				});

				$(".l-link").hover(function() {
					$(this).addClass("l-link-over");
				}, function() {
					$(this).removeClass("l-link-over");
				});
		

				tab = liger.get("framecenter");
				accordion = liger.get("accordion1");
				tree = liger.get("tree1");
				$("#pageloading").hide();

				css_init();
				pages_init();
				
				//添加代码
				$('.main-menu').ligerTree({
					checkbox: false,
                    slide: false,
                    nodeWidth: 120,
                    attribute: ['tabid', 'url','class'],
                    onSelect: function (node)
                    {
						$('.main-menu li .l-body,.main-menu li').removeClass('l-selected');
						$(node.target).addClass('l-selected');
                        if (!node.data.url) return;
                        var tabid = $(node.target).attr("tabid");
                        if (!tabid)
                        {
                            tabid = new Date().getTime();
                            $(node.target).attr("tabid", tabid)
                        } 
                        addTab(tabid, node.data.text, node.data.url);
                    }
				});
			});

			function f_heightChanged(options) {
				if (tab)
					tab.addHeight(options.diff);
				if (accordion && options.middleHeight - 24 > 0)
					accordion.setHeight(options.middleHeight - 24);
			}

			
			var publicPath='__PUBLIC__';
			var skin_links = {
				"aqua": publicPath+"/lib/ligerUI/skins/Aqua/css/ligerui-all.css",
				"gray": publicPath+"__PUBLIC__/lib/ligerUI/skins/Gray/css/all.css",
				"silvery": publicPath+"__PUBLIC__/lib/ligerUI/skins/Silvery/css/style.css",
				"gray2014": publicPath+"__PUBLIC__/lib/ligerUI/skins/gray2014/css/all.css"
			};

			function pages_init() {
				var tabJson = $.cookie('liger-home-tab');
				if (tabJson) {
					var tabitems = JSON2.parse(tabJson);
					for (var i = 0; tabitems && tabitems[i]; i++) {
						addTab(tabitems[i].tabid, tabitems[i].text, tabitems[i].url);
					}
				}
			}

			function saveTabStatus() {
				$.cookie('liger-home-tab', JSON2.stringify(tabItems));
			}

			function css_init() {
				var css = $("#mylink").get(0),
					skin = getQueryString("skin");
				$("#skinSelect").val(skin);
				$("#skinSelect").change(function() {
					if (this.value) {
						location.href = "__URL__?skin=" + this.value;
					} else {
						location.href = "__URL__";
					}
				});


				if (!css || !skin) return;
				skin = skin.toLowerCase();
				$('body').addClass("body-" + skin);
				$(css).attr("href", skin_links[skin]);
			}

			function getQueryString(name) {
				var now_url = document.location.search.slice(1),
					q_array = now_url.split('&');
				for (var i = 0; i < q_array.length; i++) {
					var v_array = q_array[i].split('=');
					if (v_array[0] == name) {
						return v_array[1];
					}
				}
				return false;
			}

			function attachLinkToFrame(iframeId, filename) {
				if (!window.frames[iframeId]) return;
				var head = window.frames[iframeId].document.getElementsByTagName('head').item(0);
				var fileref = window.frames[iframeId].document.createElement("link");
				if (!fileref) return;
				fileref.setAttribute("rel", "stylesheet");
				fileref.setAttribute("type", "text/css");
				fileref.setAttribute("href", filename);
				head.appendChild(fileref);
			}
		</script>
		<style type="text/css">
			body,
			html {
				height: 100%;
			}
			body {
				padding: 0px;
				margin: 0;
				overflow: hidden;
			}
			.l-link {
				display: block;
				height: 26px;
				line-height: 26px;
				padding-left: 10px;
				text-decoration: underline;
				color: #333;
			}
			.l-link2 {
				text-decoration: underline;
				color: white;
				margin-left: 2px;
				margin-right: 2px;
			}
			.l-layout-top {
				background: #102A49;
				color: White;
			}
			.l-layout-bottom {
				background: #E5EDEF;
				text-align: center;
			}
			#pageloading {
				position: absolute;
				left: 0px;
				top: 0px;
				background: white no-repeat center;
				width: 100%;
				height: 100%;
				z-index: 99999;
			}
			.l-link {
				display: block;
				line-height: 22px;
				height: 22px;
				padding-left: 16px;
				border: 1px solid white;
				margin: 4px;
			}
			.l-link-over {
				background: #FFEEAC;
				border: 1px solid #DB9F00;
			}
			.l-winbar {
				background: #2B5A76;
				height: 30px;
				position: absolute;
				left: 0px;
				bottom: 0px;
				width: 100%;
				z-index: 99999;
			}
			.space {
				color: #E7E7E7;
			}
			/* 顶部 */
			.l-topmenu {
				margin: 0;
				padding: 0;
				height: 31px;
				line-height: 31px;
				background: url('__PUBLIC__/lib/images/top.jpg') repeat-x bottom;
				position: relative;
				border-top: 1px solid #1D438B;
			}
			.l-topmenu-logo {
				color: #E7E7E7;
				padding-left: 35px;
				line-height: 26px;
				background: url('__PUBLIC__/lib/images/topicon.gif') no-repeat 10px 5px;
			}
			.l-topmenu-welcome {
				position: absolute;
				height: 24px;
				line-height: 24px;
				right: 30px;
				top: 2px;
				color: #070A0C;
			}
			.l-topmenu-welcome a {
				color: #E7E7E7;
				text-decoration: underline
			}
			.body-gray2014 #framecenter {
				margin-top: 3px;
			}
			.viewsourcelink {
				background: #B3D9F7;
				display: block;
				position: absolute;
				right: 10px;
				top: 3px;
				padding: 6px 4px;
				color: #333;
				text-decoration: underline;
			}
			.viewsourcelink-over {
				background: #81C0F2;
			}
			.l-topmenu-welcome label {
				color: white;
			}
			#skinSelect {
				margin-right: 6px;
			}
			.main-menu{
				margin-top: 3px; 
				width: 208px;
			}
		</style>
	</head>

	<body style="padding:0px;background:#EAEEF5;">
		<div id="pageloading"></div>
		<div id="topmenu" class="l-topmenu">
			<div class="l-topmenu-logo">jQuery ligerUI Demos导航主页</div>
			<div class="l-topmenu-welcome">
				<label>皮肤切换：</label>
				<select id="skinSelect">
					<option value="aqua">默认</option>
					<option value="silvery">Silvery</option>
					<option value="gray">Gray</option>
					<option value="gray2014">Gray2014</option>
				</select>
				<a href="index.aspx" class="l-link2">服务器版本</a>
				<span class="space">|</span>
				<a href="https://me.alipay.com/daomi" class="l-link2" target="_blank">捐赠</a> 
				<span class="space">|</span>
				<a href="http://bbs.ligerui.com" class="l-link2" target="_blank">论坛</a>
			</div>
		</div>
		<div id="layout1" style="width:99.2%; margin:0 auto; margin-top:4px; ">
			<div position="left" title="主要菜单" id="accordion1">
				<div title="个人中心">
					<ul class="main-menu">
						<li url="__URL__/welcome" tabid="welcome" class="l-selected">
							<span>我的主页</span></li>
						<li url="__URL__/person" tabid="person">
							<span>个人信息</span></li>
					</ul>
				</div>
				<div title="用户管理">
					<ul class="main-menu">
						<li url="__MODULE__/user" tabid="user_list">
							<span>前台用户管理</span></li>
						<li url="__MODULE__/admin" tabid="admin_list">
							<span>后台用户管理</span></li>
					</ul>
				</div>
				<div title="内容管理">
					<ul class="main-menu">
						<li url="__MODULE__/site" tabid="site">
							<span>网站设置</span></li>
						<li url="__MODULE__/column" tabid="column_list">
							<span>栏目管理</span></li>
						<li url="__MODULE__/article" tabid="article_list">
							<span>文章管理</span></li>
						<li url="__MODULE__/template" tabid="template_list">
							<span>模版管理</span></li>
					</ul>
				</div>
				<div title="系统管理">
					<ul class="main-menu">
						<li url="__MODULE__/role" tabid="role_list">
							<span>角色管理</span></li>
						<li url="__MODULE__/param" tabid="param">
							<span>系统配置</span></li>
						<li url="__MODULE__/sys" tabid="sys">
							<span>系统维护</span></li>
						<li url="__MODULE__/ip" tabid="ip">
							<span>屏蔽ip</span></li>
						<li url="__MODULE__/log" tabid="log">
							<span>操作日志</span></li>
					</ul>
				</div>
			</div>
			<div position="center" id="framecenter">
				<div tabid="welcome" title="我的主页" style="height:300px">
					<iframe frameborder="0" name="home" id="home" src="__URL__/welcome"></iframe>
				</div>
			</div>
		</div>
		<div style="height:32px; line-height:32px; text-align:center;">
			Copyright © 2011-2014 www.ligerui.com
		</div>
		<div style="display:none"></div>
	</body>

</html>
